package cn.edu.scau.dropship.ServiceImpl;

import cn.edu.scau.dropship.entity.Data_dictionary;
import cn.edu.scau.dropship.entity.Data_dictionaryExample;
import cn.edu.scau.dropship.mapper.Data_dictionaryMapper;
import cn.edu.scau.dropship.service.DictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DictionaryServiceImpl implements DictionaryService {

    @Autowired
    private Data_dictionaryMapper data_dictionaryMapper;

    @Override
    public long countByExample(Data_dictionaryExample example) {
        return data_dictionaryMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(Data_dictionaryExample example) {
        return data_dictionaryMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return data_dictionaryMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Data_dictionary record) {
        return data_dictionaryMapper.insert(record);
    }

    @Override
    public int insertSelective(Data_dictionary record) {
        return data_dictionaryMapper.insertSelective(record);
    }

    @Override
    public List<Data_dictionary> selectByExample(Data_dictionaryExample example) {
        return data_dictionaryMapper.selectByExample(example);
    }

    @Override
    public Data_dictionary selectByPrimaryKey(Integer id) {
        return data_dictionaryMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByExampleSelective(Data_dictionary record, Data_dictionaryExample example) {
        return data_dictionaryMapper.updateByExampleSelective(record, example);
    }

    @Override
    public int updateByExample(Data_dictionary record, Data_dictionaryExample example) {
        return data_dictionaryMapper.updateByExample(record, example);
    }

    @Override
    public int updateByPrimaryKeySelective(Data_dictionary record) {
        return data_dictionaryMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Data_dictionary record) {
        return data_dictionaryMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Data_dictionary> getlist() {
        Data_dictionaryExample data_dictionaryExample = new Data_dictionaryExample();
        Data_dictionaryExample.Criteria criteria = data_dictionaryExample.createCriteria();
        criteria.andIdIsNotNull();
        List<Data_dictionary> list = data_dictionaryMapper.selectByExample(data_dictionaryExample);
        return list;
    }
}
